<template>
  <m-page>
    <!-- 贷款主页 -->
    <m-header title="长湘贷"></m-header>
    <div class="loans-container">
      <div class="loans-image">
        <img class="img" src="@assets/loans/index.png" alt="">
      </div>
      <div class="btn-box">
        <ynet-button class="btns" type="warning" @click="handleLoans">贷款</ynet-button>
        <ynet-button class="btn btns" type="primary" @click="handleSign">签约</ynet-button>
      </div>
    </div>
  </m-page>
</template>

<script>
  import ynetButton from '@components/button/index'
  export default {
    components: {
      ynetButton
    },
    data() {
      return {
        
      }
    },
    methods: {
      handleLoans() {
        console.log('贷款')
        // 进入贷款信息界面
        let params = {
          // 跳转参数
        };
        app.api.pushWindow(
          "long_xiang_loans/loans_details.html",
          params
        )
      },
      handleSign() {
        console.log('签约')
        // 进入签约信息界面
        let params = {
          // 跳转参数
        };
        app.api.pushWindow(
          "long_xiang_loans/sign_list.html",
          params
        )
      },
      isAccount() {
        let msg = '小e发现您还未添加长沙银行I类账户，请添加后再来使用哦！'
        // 是否加挂一类户
        app.api.confirm(msg, '', { okButton: '添加账户', cancelButton: '暂不处理' }).then(res => {
            if (res.ok) {
              // 跳转到添加账户页
            } else {
              // 返回长湘贷宣传页（已办理）页【签约和贷款按钮不可用】
            }
        });
      },
      isCloudShield() {
        let msg = '您暂未开通长沙银行云盾服务，请开通后再来使用哦！'
        // 是否未开通云盾
        app.api.confirm(msg, '', { okButton: '前往开通', cancelButton: '暂不处理' }).then(res => {
            if (res.ok) {
              // 跳转到云盾服务页
            } else {
              // 返回长湘贷宣传页（已办理）页【签约和贷款按钮不可用】
            }
        });
      }
    },
    created() {},
    mounted() {},
    watch: {},
    computed: {}
  }
</script>

<style lang="scss" scoped>
  @import './index.scss';
</style>

